public class demo8 {
    public static void main(String[] args) {
        Thread t = new Thread(() -> {
           while ( !Thread.currentThread().isInterrupted()){
               System.out.println("正在运行 run");

               try {
                   Thread.sleep(9000);
               } catch (InterruptedException e) {

                   break;
               }
           }
        });
        t.start();
        try {
            Thread.sleep(3000);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        t.interrupt();
    }
}
